package cn.edu.scau.cmi.liujiaming.chapter06;

class Animal{
	void cry() {
		
	}
}

class Dog extends Animal{
	void cry() {
		System.out.println("汪汪。。。");
	}
}

class Cat extends Animal{
	void cry() {
		System.out.println("喵喵。。。");
	}
}

public class Example6_8 {
	public static void main(String arg[]) {
		Animal dog,cat;
		dog=new Dog();
		cat=new Cat();
		dog.cry();
		cat.cry();
	}

}

